package com.bejoy.coolatin;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
	private Button testbutton, Testmap, LookConstrucButton,
			ServiceOnlinebutton, CommonProblemButton, HousekeeperButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		initView();
	}

	private void initView() {
		Testmap = (Button) findViewById(R.id.Testmap);
		testbutton = (Button) findViewById(R.id.testbutton);
		LookConstrucButton = (Button) findViewById(R.id.LookConstrucButton);
		ServiceOnlinebutton = (Button) findViewById(R.id.ServiceOnlinebutton);
		CommonProblemButton = (Button) findViewById(R.id.CommonProblemButton);
		HousekeeperButton = (Button) findViewById(R.id.HousekeeperButton);
		Testmap.setOnClickListener(this);
		testbutton.setOnClickListener(this);
		LookConstrucButton.setOnClickListener(this);
		ServiceOnlinebutton.setOnClickListener(this);
		CommonProblemButton.setOnClickListener(this);
		HousekeeperButton.setOnClickListener(this);
		
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.Testmap:
			startActivity(new Intent(MainActivity.this, MapTestActivity.class));
			break;
		case R.id.testbutton:
			startActivity(new Intent(MainActivity.this, UmengshareActivity.class));
			break;
		case R.id.LookConstrucButton:
			startActivity(new Intent(MainActivity.this, MapTestActivity.class));
			break;
		case R.id.CommonProblemButton:
			startActivity(new Intent(MainActivity.this, MapTestActivity.class));
			break;
		case R.id.HousekeeperButton:
			startActivity(new Intent(MainActivity.this, HousekeeperActivity.class));
			break;
		case R.id.ServiceOnlinebutton:
			startActivity(new Intent(MainActivity.this, MapTestActivity.class));
			break;
		default:
			break;
		}

	}
}
